package org.mihalovic.PES.data;


/**
 * Wrapper for various exceptions that can occur during session on SQL server
 */
public class DBConnectionException extends Exception {

    private String message;
    private String sqlQuery;



    public DBConnectionException(String message) {
        this(message, null, "");
    }


    public DBConnectionException(String message, String query) {
        this(message, null, query);
    }


    public DBConnectionException(String message, Exception cause) {
        this(message, cause, "");
    }


    public DBConnectionException(String message, Exception cause, String sqlQuery) {
        super(message, cause);

        this.message = message;
        this.sqlQuery = sqlQuery;
    }


    @Override
    public String getMessage() { return message; }
    
    public String getSqlQuery() { return sqlQuery; }
}
